﻿
Public Class Logs
    Private Shared m_AccessFile As String = "access.txt"
    Private Shared m_ErrorFile As String = "error.txt"

    Private Shared m_AccessLock As New Object()
    Private Shared m_ErrorLock As New Object()

    Public Shared Sub Access(message As String)
        SyncLock m_AccessFile
            IO.File.AppendAllText(m_AccessFile, "[" & DateTime.Now & "] " & message & vbCrLf)
        End SyncLock
    End Sub

    Public Shared Sub [Error](message As String)
        SyncLock m_ErrorLock
            IO.File.AppendAllText(m_ErrorFile, "[" & DateTime.Now & "] " & message & vbCrLf)
        End SyncLock
    End Sub
End Class
